<!-- Top content -->
<div class="ibox-content auto-height-box">
    <div class="ibox">
        <div class="ibox-title">
            <h5>{:lang('我的企业')}</h5>
            <div class="ibox-tools">
                <a class="btn btn-xs btn-info btn-outline ajax-open" width="800" height="500"
                   data-calback="window.location.reload(true)" data-url="{:url('TenDev/add')}">
                    <i class="fa fa-plus"> {:lang('创建企业')}</i>
                </a>

                <a class="btn btn-xs btn-info btn-outline ajax-get"
                   data-calback="window.location.reload(true)" data-url="{:url('Login/logout')}">
                    <i class="fa fa-sign-out"> {:lang('退出登录')}</i>
                </a>
            </div>
        </div>
        <div class="ibox-content">
            <div class="row">
                {volist name='list' id='vo'}
                <div class="col-sm-4">
                    <div class="contact-box">
                        <a class="goto-tenant-cmc" href="{:url('TenDev/Init',array('ten_tenant_id'=>$vo.id))}">
                            <div class="col-sm-4">
                                <div class="text-center">
                                    <img alt="image" class="img-circle  img-responsive"
                                         src="{$vo.logopic|get_picture_url='plat'}">
                                    <div class="m-t-xs font-bold">{$vo.username}</div>
                                </div>
                            </div>
                        </a>
                        <div class="col-sm-8">
                            <a class="goto-tenant-cmc" href="{:url('TenDev/Init',array('ten_tenant_id'=>$vo.id))}">
                                <h3><strong>{$vo.company}</strong></h3>
                                <p title="有效服务日期"><i class="fa fa-calendar-times-o"></i>
                                    {$vo.start_date} - {$vo.stop_date}
                                    {$vo.is_expire}
                                </p>
                                <p title="最大用户数"><i class="fa fa-users"></i> {$vo.tenant_max_user}</p>
                                <p title="企业联系人"><i class="fa fa-user"></i> {$vo.linkman}</p>
                                <p><i class="fa fa-phone"></i> {$vo.mobile}</p>
                                <p><i class="fa fa-envelope"></i> {$vo.email}</p>
                            </a>
                        </div>
                        <div class="clearfix"></div>
                    </div>
                </div>
                {/volist}
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-sm-12">
            <div class="copyrights text-center"><a href="http://www.07fly.xyz">{:lang('技术支持')}:{:lang('成都零起飞网络')} </a></div>
        </div>
    </div>
</div>

<script>
    $(document).ready(function () {
        $('.contact-box').each(function () {
            animationHover(this, 'pulse');
        });
        $('.goto-tenant-cmc').on('click', function () {
            event.preventDefault();
            var target = $(this).attr('href');
            $.ajax({
                type: "POST",
                url: target,
                data: '',
                dataType: "json",
                success: function (data) {
                    if (data.code == '1') {
                        layer.msg(data.msg, {icon: 1, shade: 0.01});
                        window.location.href = data.url;
                    } else {
                        layer.msg(data.msg, {icon: 5});
                    }
                }
            });
        });
    });
</script>
</html>